package com.fowo.api.model.wfs.cargo.item;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** WFS货件子表 导入导出辅助模型 */
@Getter
@Setter
public class WfsCargoItemExcelPo {

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属WFS货件")
  private String parentWfsCargoCargoCode;

  @ExcelIgnore
  @ExcelProperty(value = "所属WFS货件")
  private Long parentWfsCargo;

  @Size(max = 50, message = "图片长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "图片")
  private String img;

  @Size(max = 50, message = "MSKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "MSKU")
  private String msku;

  @Size(max = 50, message = "GTIN码长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "GTIN码")
  private String gtin;

  @NotNull(message = "品名不能为空")
  @Size(max = 50, message = "品名长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*品名")
  private String productNameName;

  @ExcelIgnore
  @ExcelProperty(value = "*品名")
  private Long productName;

  @Size(max = 50, message = "SKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "SKU")
  private String sku;

  @NotBlank(message = "商品类型不能为空")
  @EnumsString(
    value = { "GTIN", "UPC", "EAN" },
    message = "商品类型的可用值为 “GTIN”, “UPC”, “EAN” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*商品类型")
  private String productType;

  @NotBlank(message = "商品描述不能为空")
  @Size(max = 50, message = "商品描述长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*商品描述")
  private String productDescribe;

  @NotNull(message = "申报量不能为空")
  @Size(max = 50, message = "申报量长度不能超过20")
  @ExcelProperty(value = "*申报量")
  private Integer declareNum;

  @ExcelProperty(value = "签收量")
  private Long receivedquantity;

  @NotNull(message = "箱子数量不能为空")
  @ExcelProperty(value = "*箱子数量")
  private Integer boxNum;

  @NotNull(message = "单箱产品数量不能为空")
  @ExcelProperty(value = "*单箱产品数量")
  private Integer singleboxquantity;

  @NotNull(message = "预估到期时间不能为空")
  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "*预估到期时间")
  private java.util.Date estimatedExpirationTime;

  @NotBlank(message = "增值服务不能为空")
  @EnumsString(
    value = { "需要", "不需要" },
    message = "增值服务的可用值为 “需要”, “不需要” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*增值服务")
  private String valueaddedservices;

  @ExcelProperty(value = "签收数量(损坏)")
  private Integer receivedNum;

  @ExcelProperty(value = "已发货数量")
  private Integer shipmentsNum;

  @ExcelProperty(value = "申发差异")
  private Integer shenfadifference;

  @ExcelProperty(value = "申收差异")
  private Integer shenshoudifference;

  @ExcelProperty(value = "收发差异")
  private Integer shoufadifference;
}
